<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterVulsTable20171226 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //增加漏洞修复时间字段
        Schema::table('vuls', function (Blueprint $table) {
            $table->timestamp('closed_at')->nullable()->comment('漏洞修复时间，即关闭时间');
//            $table->string('vuls_number',20)->after('id')->default('')->comment('漏洞编号');
        });
    }

    /**
     * 回滚时删除字段
     *
     * @return void
     */
    public function down()
    {
        //
//        Schema::table('vuls', function (Blueprint $table) {
//            $table->dropColumn(['closed_at','vuls_number']);
//        });
    }
}
